import request from '@/utils/request'

export function saveRole(data) {
  return request({
    url: 'sys/role/save',
    method: 'post',
    data
  })
}

export function updateRole(data) {
  return request({
    url: 'sys/role/update',
    method: 'post',
    data
  })
}

export function getRoleList(data) {
  return request({
    url: 'sys/role/page',
    method: 'get',
    params: data
  })
}

export function getALLRoleList() {
  return request({
    url: 'sys/role/list',
    method: 'get'
  })
}

export function getRoleInfo(userId) {
  return request({
    url: 'sys/role/info/' + userId,
    method: 'get'
  })
}

export function deleteRole(roleIds) {
  return request({
    url: 'sys/role/delete',
    method: 'post',
    data: roleIds
  })
}
